package apiday01;

public class SubstringDemo {
    public static void main(String[] args) {
        //
        //
        String str = "www.tedu.cn";

        int start = str.indexOf(".") + 1;
        int end = str.lastIndexOf(".");
        String name = str.substring(start, end);
        System.out.println(name);

        name = str.substring(4);
        System.out.println(name);
    }
}
